#pragma once
#include <iostream>
#include <functional>
#include <unistd.h>

class Task
{
public:
    Task()
    {}
    Task(int x, int y): a(x), b(y)
    {

    }
    void Execute()
    {
        result = a + b;
    }
    void operator()()
    {
        sleep(1);
        Execute();
    }
    void Print()
    {
        std::cout << a << " + " << b << " = " << result << std::endl;
    }
private:
    int a;
    int b;
    int result;
};

using func_t=std::function<void()>; 
void PrintLog()
{
    std::cout << "hello 我是一个日志任务" << std::endl;
}